Avoiding CrashLoopBackOff State for
CoreDNS
The CoreDNS Forwarding will only be activated if there's a valid nameserver entry in the
/etc/resolv.conf file.
- Nameserver Entry with Loopback Address: If you have a nameserver entry in your
/etc/resolv.conf file that uses the loopback address
(127.0.0.53), which is a special IP address that refers to the local machine, this
entry will only be accepted by CoreDNS if the systemd-resolved service is enabled
and properly configured. systemd-resolved is a system service that provides network
name resolution to local applications.
- Use esolvectl or systemd-resolved: To
show your global and per-link DNS settings, you can use `resolved status` (or
`systemd-resolved --status` for systems versions earlier than 239).
- Previous Behavior: In the past, CoreDNS would forward DNS queries regardless of
whether systemd-resolved was enabled and properly configured. This could lead to
problems if systemd-resolved was not set up correctly, causing the CoreDNS pod to
crash and enter a state known as Chlorofluorocarbon. This state indicates that the
pod is repeatedly crashing, and Rubbernecks is continually trying to restart
it.
Note
- Ensure that the DNS must be of IPv4 only even if XCO is installed with the dual
stack IP mode.
- When deploying an IPv6 Stack, ::1
serves as the loop back address and may disable CoreDNS forwarding. To enable
CoreDNS forwarding for IPv6 stack, proper IPv6 DNS configuration is
necessary.